package com.sqx.modules.task.service;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.sqx.common.utils.Result;
import com.sqx.modules.bidding.entity.HelpBidding;
import com.sqx.modules.task.entity.HelpOrder;

public interface HelpOrderService extends IService<HelpOrder> {

    Result selectHelpOrder(int page, int limit);

    /**
     * 公共付款回调
     * @param bidding
     * @param helpOrder
     * @return
     */
    void choseUserOrder(HelpBidding bidding, HelpOrder helpOrder);

    Result selectNewHelpOrderList(int page, int limit, Long gameId, String latitude, String longitude, Integer sort, Integer taskType, Long classifyId, Long userId);

    Result selectHelpOrderByClassifyList(int page,int limit,Long classifyId,Long gameId);

    Result selectHelpOrderByContentList(int page,int limit,String content,Long gameId);

    HelpOrder selectHelpOrderById(Long helpOrderId, Long userId, Long userIds,String longitude,String latitude);

    Result selectCreateHelpOrder(int page,int limit,Integer status,Long userId,Long gameId);

    Result selectStatusHelpOrder(int page,int limit,String phone,String content,Integer status,Long gameId,Integer taskType);

    Result saveBody(HelpOrder helpOrder);

    Result adminSaveBody(HelpOrder helpOrder);

    Result saveBodys(HelpOrder helpOrder);

    Result updateHelpOrderByStatus(String ids,Integer status,String content);

    Result updateHelpOrderById(HelpOrder helpOrder);

    Result updateHelpOrderByIds(HelpOrder helpOrder);

    boolean updateById(HelpOrder helpOrder);

    Result deleteById(Long id);

    Result deleteByIds(Long id);

    Result outHelpOrder(Long id);

    Integer countHelpOrderByCreateTime( String time, Integer flag);

    Double sumPrice( String time, Integer flag);


    Result choiceBidding(Long orderId, Long biddingId);

    Result updateTimeAndRemarks(Long helpOrderId, String deliveryTime, String remarks);

    IPage<HelpOrder> selectNowDayOrders(Integer page, Integer limit, Long userId);

    Result payMoney(Long ordersId);

    /**
     * 订单播报
     */
    Result orderBroadcast();
}
